home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
tex
/
texsrc.arc
/
TEXD.H
< prev
next >
Wrap
C/C++ Source or Header
|
1988-09-14
|
12KB
|
387 lines
/* hacked up by David Dermott for MEGAMAX-c */
#include "tex.h"
#ifdef TRIP
#define MEMMAX 2999L
#define memmin 0L
#define bufsize 500L
#define errorline 64
#define halferrorlin 32
#define maxprintline 72
#define stacksize 200L
#define maxinopen 6
#define fontmax 75L
#define fontmemsize 20000L
#define paramsize 60L
#define nestsize 40L
#define maxstrings 3000L
#define stringvacanc 8000L
#define poolsize 32000L
#define savesize 600L
#define triesize 8000L
#define dvibufsize 1024
#define filenamesize 40
#define poolname "tex.pool"
#define MEMTOP 2999L
#else /* not TRIP */
#define MEMMAX 60000L
#define memmin 0L
#define bufsize 500L
#define errorline 79
#define halferrorlin 50
#define maxprintline 79
#define stacksize 200L
#define maxinopen 15
#define fontmax 100L
#define fontmemsize 30000L
#define paramsize 60L
#define nestsize 40L
#define maxstrings 4400L
#define stringvacanc 15000L
#define poolsize 45000L
#define savesize 2000L
#define triesize 8000L
#define dvibufsize 1024
#define filenamesize 40
#define poolname "tex.pool"
#define MEMTOP 50000L
#endif /* TRIP */
typedef quarterword ASCIIcode ;
typedef quarterword eightbits ;
typedef integer poolpointer ;
typedef integer strnumber ;
typedef integer scaled ;
typedef integer nonnegativei ;
typedef quarterword smallnumber ;
typedef quarterword twochoices ;
typedef quarterword fourchoices ;
typedef quarterword glueord ;
typedef struct { int modefield ;
halfword headfield, tailfield ;
integer pgfield, auxfield, mlfield ;
} liststaterec ;
typedef quarterword groupcode ;
typedef struct { quarterword statefield, indexfield ;
halfword startfield, locfield, limitfield, namefield ;
} instaterecor ;
typedef integer internalfont ;
typedef integer dviindex ;
typedef integer triepointer ;
typedef halfword hyphpointer ;
EXTERN integer bad ;
EXTERN ASCIIcode xord[128] ;
EXTERN char xchr[256] ;
EXTERN char nameoffile[filenamesize + 1], realnameoffi[filenamesize + 1] ;
EXTERN integer namelength ;
EXTERN ASCIIcode buffer[bufsize + 1] ;
EXTERN integer first ;
EXTERN integer last ;
EXTERN integer maxbufstack ;
/*EXTERN ASCIIcode strpool[poolsize + 1] ; */
EXTERN ASCIIcode *strpool ;
/*EXTERN poolpointer strstart[maxstrings + 1] ; */
EXTERN poolpointer *strstart ;
EXTERN poolpointer poolptr ;
EXTERN strnumber strptr ;
EXTERN poolpointer initpoolptr ;
EXTERN strnumber initstrptr ;
#ifdef INITEX
EXTERN alphafile poolfile ;
#endif /* INITEX */
EXTERN alphafile logfile ;
EXTERN quarterword selector ;
EXTERN quarterword dig[23] ;
EXTERN integer tally ;
EXTERN integer termoffset ;
EXTERN integer fileoffset ;
EXTERN ASCIIcode trickbuf[errorline + 1] ;
EXTERN integer trickcount ;
EXTERN integer firstcount ;
EXTERN quarterword interaction ;
EXTERN boolean deletionsall ;
EXTERN quarterword history ;
EXTERN int errorcount ;
EXTERN strnumber helpline[6] ;
EXTERN quarterword helpptr ;
EXTERN boolean useerrhelp ;
EXTERN integer interrupt ;
EXTERN boolean OKtointerrup ;
EXTERN boolean aritherror ;
EXTERN scaled remainder ;
EXTERN halfword tempptr ;
/*EXTERN memoryword zzzaa[memmax - memmin + 1] ; */
EXTERN memoryword *zzzaa ;
EXTERN halfword lomemmax ;
EXTERN halfword himemmin ;
EXTERN integer varused, dynused ;
EXTERN halfword avail ;
EXTERN halfword memend ;
EXTERN halfword rover ;
#ifdef DEBUG
/*EXTERN boolean zzzab[memmax - memmin + 1], *freearr ; */
EXTERN boolean *zzzab, *freearr ;
/*EXTERN boolean zzzac[memmax - memmin + 1], *wasfree ; */
EXTERN boolean *zzzac, *wasfree ;
EXTERN halfword wasmemend, waslomax, washimin ;
EXTERN boolean panicking ;
#endif /* DEBUG */
EXTERN integer fontinshortd ;
EXTERN integer depththresho ;
EXTERN integer breadthmax ;
EXTERN liststaterec nest[nestsize + 1] ;
EXTERN integer nestptr ;
EXTERN integer maxneststack ;
EXTERN liststaterec curlist ;
EXTERN int shownmode ;
EXTERN quarterword oldsetting ;
/*EXTERN memoryword zeqtb[5977] ; */
EXTERN memoryword *zeqtb ;
/*EXTERN quarterword zzzad[710], *xeqlevel ; */
EXTERN quarterword *zzzad, *xeqlevel ;
/*EXTERN twohalves zzzae[3267], *hash ; */
EXTERN twohalves *zzzae, *hash ;
EXTERN halfword hashused ;
EXTERN boolean nonewcontrol ;
EXTERN integer cscount ;
/*EXTERN memoryword savestack[savesize + 1] ; */
EXTERN memoryword *savestack ;
EXTERN integer saveptr ;
EXTERN integer maxsavestack ;
EXTERN quarterword curlevel ;
EXTERN groupcode curgroup ;
EXTERN integer curboundary ;
EXTERN integer magset ;
EXTERN eightbits curcmd ;
EXTERN halfword curchr ;
EXTERN halfword curcs ;
EXTERN halfword curtok ;
/*EXTERN instaterecor inputstack[stacksize + 1] ; */
EXTERN instaterecor *inputstack ;
EXTERN integer inputptr ;
EXTERN integer maxinstack ;
EXTERN instaterecor curinput ;
EXTERN integer inopen ;
EXTERN alphafile inputfile[maxinopen + 1] ;
EXTERN integer line ;
EXTERN integer linestack[maxinopen + 1] ;
EXTERN quarterword scannerstatu ;
EXTERN halfword warningindex ;
EXTERN halfword defref ;
EXTERN halfword paramstack[paramsize + 1] ;
EXTERN integer paramptr ;
EXTERN integer maxparamstac ;
EXTERN integer alignstate ;
EXTERN integer baseptr ;
EXTERN halfword parloc ;
EXTERN halfword partoken ;
EXTERN boolean forceeof ;
EXTERN halfword curmark[5] ;
EXTERN quarterword longstate ;
EXTERN halfword pstack[9] ;
EXTERN integer curval ;
EXTERN quarterword curvallevel ;
EXTERN smallnumber radix ;
EXTERN glueord curorder ;
EXTERN alphafile readfile[16] ;
EXTERN quarterword readopen[17] ;
EXTERN halfword condptr ;
EXTERN quarterword iflimit ;
EXTERN smallnumber curif ;
EXTERN integer ifline ;
EXTERN integer skipline ;
EXTERN strnumber curname ;
EXTERN strnumber curarea ;
EXTERN strnumber curext ;
EXTERN poolpointer areadelimite ;
EXTERN poolpointer extdelimiter ;
EXTERN ccharpointer TEXformatdef ;
EXTERN boolean nameinprogre ;
EXTERN strnumber jobname ;
EXTERN bytefile dvifile ;
EXTERN strnumber outputfilena ;
EXTERN strnumber logname ;
EXTERN bytefile tfmfile ;
/*EXTERN memoryword fontinfo[fontmemsize + 1] ; */
EXTERN memoryword *fontinfo ;
EXTERN integer fmemptr ;
EXTERN internalfont fontptr ;
/*EXTERN fourquarters fontcheck[fontmax + 1] ; */
EXTERN fourquarters *fontcheck ;
/*EXTERN scaled fontsize[fontmax + 1] ; */
EXTERN scaled *fontsize ;
/*EXTERN scaled fontdsize[fontmax + 1] ; */
EXTERN scaled *fontdsize ;
/*EXTERN halfword fontparams[fontmax + 1] ; */
EXTERN halfword *fontparams ;
/*EXTERN strnumber fontname[fontmax + 1] ; */
EXTERN strnumber *fontname ;
/*EXTERN strnumber fontarea[fontmax + 1] ; */
EXTERN strnumber *fontarea ;
/*EXTERN eightbits fontbc[fontmax + 1] ; */
EXTERN eightbits *fontbc ;
/*EXTERN eightbits fontec[fontmax + 1] ; */
EXTERN eightbits *fontec ;
/*EXTERN halfword fontglue[fontmax + 1] ; */
EXTERN halfword *fontglue ;
/*EXTERN boolean fontused[fontmax + 1] ; */
EXTERN boolean *fontused ;
/*EXTERN integer hyphenchar[fontmax + 1] ; */
EXTERN integer *hyphenchar ;
/*EXTERN integer skewchar[fontmax + 1] ; */
EXTERN integer *skewchar ;
/*EXTERN integer charbase[fontmax + 1] ; */
EXTERN integer *charbase ;
/*EXTERN integer widthbase[fontmax + 1] ; */
EXTERN integer *widthbase ;
/*EXTERN integer heightbase[fontmax + 1] ; */
EXTERN integer *heightbase ;
/*EXTERN integer depthbase[fontmax + 1] ; */
EXTERN integer *depthbase ;
/*EXTERN integer italicbase[fontmax + 1] ; */
EXTERN integer *italicbase ;
/*EXTERN integer ligkernbase[fontmax + 1] ; */
EXTERN integer *ligkernbase ;
/*EXTERN integer kernbase[fontmax + 1] ; */
EXTERN integer *kernbase ;
/*EXTERN integer extenbase[fontmax + 1] ; */
EXTERN integer *extenbase ;
/*EXTERN integer parambase[fontmax + 1] ; */
EXTERN integer *parambase ;
EXTERN fourquarters nullcharacte ;
EXTERN integer totalpages ;
EXTERN scaled maxv ;
EXTERN scaled maxh ;
EXTERN integer maxpush ;
EXTERN integer lastbop ;
EXTERN integer deadcycles ;
EXTERN boolean do